<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>LRY 聚合系统</title>
<link rel="icon" href="../static/favicon.ico" type="image/ico">
<meta name="keywords" content="LRY 聚合系统">
<meta name="description" content="LRY 聚合系统">
<meta name="author" content="pingc">
<link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
<link th:href="@{/static/css/materialdesignicons.min.css}" rel="stylesheet">
<link rel="stylesheet" th:href="@{/static/js/bootstrap-multitabs/multitabs.min.css}">
<link th:href="@{/static/css/style.min.css}" rel="stylesheet">
<script type="text/javascript" th:src="@{/static/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/perfect-scrollbar.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/bootstrap-multitabs/multitabs.js}"></script>
<link th:href="@{/static/css/animate.css}" rel="stylesheet">
<script type="text/javascript" th:src="@{/static/js/index.min.js}"></script>

</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <aside class="lyear-layout-sidebar">

      <!-- logo -->
      <div id="logo" class="sidebar-header">
        <a href="index"><img th:src="@{/static/images/logo-sidebar.png}" width="210"  height="40" title="LightYear" alt="LightYear" /></a>
      </div>
      <div class="lyear-layout-sidebar-scroll">

        <nav class="sidebar-">
          <ul class="nav nav-drawer">
            <li class="nav-item active"> <a class="multitabs" href="main"><i class="mdi mdi-home"></i> <span>后台首页</span></a> </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i> <span>小说管理</span></a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs" th:href="@{/admin/fiction_list/{from}/{size} (from=1,size=10)}">小说列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/fiction_variable_list/{from}/{size} (from=1,size=10)}">规则列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/fiction_variable_add}">新增规则</a> </li>
              </ul>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i> <span>漫画管理</span></a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs" th:href="@{/admin/cartoon_list/{from}/{size} (from=1,size=10)}">漫画列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/cartoon_variable_list/{from}/{size} (from=1,size=10)}">规则列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/cartoon_variable_add}">新增规则</a> </li>
              </ul>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i> <span>视频管理</span></a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs" th:href="@{/admin/video_list/{from}/{size} (from=1,size=10)}">视频列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/video_variable_list/{from}/{size} (from=1,size=10)}">规则列表</a> </li>
                <li> <a class="multitabs" th:href="@{/admin/video_variable_add}">新增规则</a> </li>
              </ul>
            </li>
          </ul>
        </nav>
      </div>

    </aside>
    <!--End 左侧导航-->

    <!--头部信息-->
    <header class="lyear-layout-header">

      <nav class="navbar navbar-default">
        <div class="topbar">

          <div class="topbar-left">
            <div class="lyear-aside-toggler">
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
            </div>
          </div>

          <ul class="topbar-right">
            <li class="dropdown dropdown-profile">
              <a href="javascript:void(0)" data-toggle="dropdown">
                <img class="img-avatar img-avatar-48 m-r-10" th:src="@{/static/images/users/avatar.jpg}" alt="admin" />
                <span th:text="${user.username}"></span><span class="caret"></span>
              </a>
              <ul class="dropdown-menu dropdown-menu-right">
                <li> <a class=" pst"  href="javascript:void(0)"><i class="mdi mdi-logout-variant"></i> 修改密码</a> </li>
                <li class="divider"></li>
                <li> <a th:href="@{/user/logout}"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
              </ul>
            </li>
          </ul>

        </div>
      </nav>

    </header>
    <!--End 头部信息-->

    <!--页面主要内容-->
    <main class="lyear-layout-content">

      <div id="iframe-content"></div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="delcfmOverhaul">
<div class="modal-dialog modal-sm" role="document">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      <h4 class="modal-title pst" >修改密码</h4>
    </div>
    <div class="modal-body">
      <input class="form-control" type="text" id="example-text-input" name="example-text-input" placeholder="密码">
    </div>
    <div class="modal-footer">
      <button type="button" id="gb" class="btn btn-default" data-dismiss="modal">关闭</button>
      <button type="button" class="btn btn-primary" id="haulBtn">确定</button>
    </div>
  </div>
</div>
</div>
<!--消息提示-->
<script th:src="@{/static/js/bootstrap-notify.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/lightyear.js}"></script>
<script type="text/javascript">
function showModal(fiction_id) {
$("#haul").val(fiction_id);// 将模态框中需要删除的大修的ID设为需要删除的ID
$("#delcfmOverhaul").modal({
backdrop : "static",
keyboard : false
});
}
function haulinfo() {
  lightyear.loading('show');
  $('#gb').click();
//修改密码操作
$.ajax({
type:"get",    //请求类型，POST\GET，不写默认GET
url:"/user/updatePassword/"+$("#example-text-input").val(),    //请求地址
dataType:"json",    //ajax接收响应的数据是什么格式。选填，不填时，根据服务端响应的类型 自动判断
success:function(data){//请求成功回调函数，在服务端成功响应数据之后，调用这个函数，有一个参数，接收返回的数据
  lightyear.loading('hide');
  if(data.code==0){
    lightyear.notify('修改成功~', 'success', 3000);
  }else{
    lightyear.notify('修改失败，请稍后再试~', 'danger', 100);
  }

},
error:function(jqXHR,textStatus,errorThrown){    //请求失败调用的函数，共有三个参数。选填，可不填
  lightyear.notify('系统错误，请稍后再试~', 'danger', 100);
}
})
}
$(function() {
// 确定按钮的点击事件
$("#haulBtn").click(function() {
// ajax异步删除
haulinfo();
});

});

//使用下面的示例之前，应当先加载jquery.js插件
$('.pst').on("click", function () {
showModal()
});

</script>
</body>


</html>